package com.welike.shibo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.welike.shibo.eneity.Audio;
import com.welike.shibo.vo.page.AudioPageVo;
import org.apache.ibatis.annotations.Param;

/**
 * Created by fangyu on 2019-08-18.
 */
public interface AudioMapper extends BaseMapper<Audio> {

    /**
     * 查询所有音频信息
     * @return
     */
    IPage<Audio> queryAllAudio(Page page);

    /**
     *
     */
    IPage<AudioPageVo> selectAudioPageVo(Page page, @Param("state") Integer state);

    String queryNameById(@Param("id")String id);

    String queryAudioUrlById(String audioId);

    int addMusic(@Param("id")String id, @Param("music") String music, @Param("name") String name, @Param("duration") Integer duration);

    int updateStatus(@Param("id") String id, @Param("status") String status);
}